package cn.zhy;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

//申明当前类是一个SpringBoot项目的启动类
//申明当前类是一个SpringBoot项目的启动类
@SpringBootApplication  //@EnableAutoConfiguration+@ComponentScan
//扫描mapper接口的包 - 生成mapper代理对象 - 可以在service中注入使用
@MapperScan("cn.zhy.*.mapper")
@ServletComponentScan(value = {"cn.zhy.basic.listener"})
public class App {
    public static void main(String[] args) {
        //使用启动类 去运行 Spring程序
        SpringApplication.run(App.class);
    }
}
